package com.spring.framework.model.xml.inject;

public class LookupMethodInject {

    public static class LookupMethodInjectA {
        private LookupMethodInjectB lookupMethodInjectB;
        /**
         * 实际上lookupMethodInC属性根本你没有注入过
         */
        private LookupMethodInjectC lookupMethodInjectC;

        public LookupMethodInjectB getLookupMethodInjectB() {
            return lookupMethodInjectB;
        }

        public void setLookupMethodInjectB(LookupMethodInjectB lookupMethodInjectB) {
            this.lookupMethodInjectB = lookupMethodInjectB;
        }

        /**
         * 实际上每一个都是找容器要对象
         */
        public LookupMethodInjectC getLookupMethodInjectC() {
            //调用createLookupMethodInC方法
            return createLookupMethodInjectC();
        }

        /**
         * 将会被动态代理替换的方法，找容器要对象
         */
        public LookupMethodInjectC createLookupMethodInjectC() {
            return lookupMethodInjectC;
        }

        public void setLookupMethodInjectC(LookupMethodInjectC lookupMethodInjectC) {
            this.lookupMethodInjectC = lookupMethodInjectC;
        }

        @Override
        public String toString() {
            return "LookupMethodInA{" +
                    "lookupMethodInB=" + lookupMethodInjectB +
                    ", lookupMethodInC=" + lookupMethodInjectC +
                    '}';
        }
    }

    public static class LookupMethodInjectB {
    }

    public static class LookupMethodInjectC {
    }
}
